1. Field of the Invention
The present invention relates to an information processing apparatus for storing data included in a volatile memory into a nonvolatile memory, and then loading the data in the volatile memory when a device is activated, and more particularly to an information processing apparatus, an image forming apparatus, a data recovery method, and a computer-readable recording medium with which the number of times of storing data in the nonvolatile memory can be reduced.
2. Description of the Related Art
When a device equipped with an information processing apparatus includes many functions that can be used by users, in many cases, it takes a long time from when the power is turned on until activation of the device is completed. The same applies to a digital multifunction peripheral having a copy function. The more the functions, such as a copy function, a printer function, and a fax function, the longer it takes for the device to be activated.
For the purpose of reducing the activation time, hibernation is performed in digital multifunction peripherals. Specifically, information of a work environment (hereinafter, “snapshot”) is stored in a nonvolatile memory before the power is turned off, and when the power is turned on once again, the snapshot is recovered in (returned to) the main memory, so that the activation time can be reduced (see, for example, patent document 1: Japanese Laid-Open Patent Application No. 2002-324012). Patent document 1 discloses a digital multifunction peripheral having the following features. Specifically, when activating the digital multifunction peripheral, the user is prompted by the OS (operating system) to indicate which hibernation area is to be used for the activation. If the specified hibernation area stores a snapshot that had been stored according to hibernation interrupt when the OS was previously shut down, the snapshot stored in the specified hibernation area is used to perform a recovery process. The digital multifunction peripheral described in patent document 1 has a function of selectively storing either of the following data items. One of the types of data is for indicating the operation status of the system. This data is stored in the hibernation area corresponding to the current user in response to hibernation interrupt. The other type of data is hibernation data including modification data indicating modifications (changes) in the data in the storage device according to operations performed by the user.
A digital multifunction peripheral is typically provided with a main power switch and an auxiliary power switch. The auxiliary power switch is for switching the device to a power saving status. When the auxiliary power switch is pressed, the entire system of the digital multifunction peripheral is switched to a power saving status in terms of the software, while power is being supplied from the main power source. In the power saving status, the user can safely turn off the power by pressing the main power switch. Thus, if hibernation were to be performed, a snapshot is to be stored at the timing when the device switches to the power saving status.
For the purpose of reducing power consumption, a digital multifunction peripheral typically has a function of automatically switching to a power saving status when the digital multifunction peripheral is not used by any users for a predetermined period of time, even if the auxiliary power switch is not pressed. From the user's point of view, when the digital multifunction peripheral has automatically switched to the power saving status, the user can safely turn off the main power switch. Thus, if hibernation were to be performed, a snapshot is to be stored at the timing when the device automatically switches to the power saving status.
The storage device used for storing snapshots may be a HDD (Hard Disk Drive) or a flash-memory-based storing medium (e.g., an SD card and a SSD (Solid State Drive), hereinafter collectively referred to as a “flash memory”). However, a HDD takes a long time to spin up, and is thus disadvantageous in terms of reducing the activation time. Furthermore, a HDD is prone to crashing, and is thus disadvantageous in terms of reliability for storing important data pertaining to the activation of the system.
Meanwhile, a flash memory is advantageous because it can be quickly initialized, and it is less prone to crashing. However, a flash memory has disadvantages in that the access speed is slow and there is a limit to the number of times it can be overwritten. A digital multifunction peripheral automatically switches to a power saving status when a certain period of time set in a timer has elapsed since a user last used the device. The user can set a time period of approximately one minute at minimum in the timer. Therefore, depending on how the digital multifunction peripheral is used, a snapshot may be stored several ten to several hundred times per day. Thus, if a flash memory is used as the storage device for storing snapshots, the following disadvantages may arise. One disadvantage is that the operation time of the digital multifunction peripheral is limited by the upper limit of the number of times the flash memory can be overwritten. Another disadvantage is that there may be inconveniences in terms of maintenance because of the need to replace components.